<?php


class WSB_Validator_StringEquals extends Zend_Validate_Abstract
{

	const NOT_EQUALS = 'stringEqualsNotEquals';

	/**
	 * @var array
	 */
    protected $_messageTemplates = array(
        self::NOT_EQUALS => "'%value%' do not equals."
    );

    /**
     * @param string $value
     * @return boolean
     */
    public function isValid($value)
    {
    	$unique = array_unique($value);
    	if(count($unique) > 1) {
    		$this->_error(self::NOT_EQUALS);
            return false;
    	}
        return true;
    }
}
